function digitsOrLetters(str) {
  str = str.toLowerCase();
  const digits = "0123456789";
  const letters = "abcdefghijklmnopqrstuvwxyz";
  let digitNum = 0;
  let letterNum = 0;
  for (let i=0; i<str.length; i++) {
    if (digits.includes(str[i])) {
      digitNum++;
    } else if (letters.includes(str[i])) {
      letterNum++;
    }
  }
  if (digitNum > letterNum) {
    return "digits";
  } else if (digitNum < letterNum) {
    return "letters";
  } else {
    return "tie";
  }
}